package com.design.mode.mediator;

import lombok.Data;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-04-12 10:12:31
 */
@Data
public abstract class Colleague {

    private Mediator mediator;

    public Colleague(Mediator mediator) {
        this.mediator = mediator;
    }

    public abstract void action();

    public void change() {
        mediator.colleagueChanged(this);
    }
}
